<?php
	//////////// start session cookies Testing Subversion update 5////////////////
	session_start(); 
	require("Login.class.php"); 
	$login = new Login; 
	
	$login->authorize(); 
	//////////////END/////////////////////////////////
	include 'config/config.php';
?>  
<head>
	<!-- 
		=================================================================================================
		Copyright (c) 2012 Athena Health. 
		This software is the proprietary information of Athena Health
		All Right Reserved.
		Repository path:    $HeadURL: http://athena-call-routing.googlecode.com/svn/trunk/index.php $
		Last committed:     $Revision: 49 $
		Last changed by:    $Author: davidjmorin@gmail.com $
		Last changed date:    $Date: 2012-07-04 14:51:26 +0000 (Wed, 04 Jul 2012) $
		ID:            $Id: index.php 49 2012-07-04 14:51:26Z davidjmorin@gmail.com $
		=================================================================================================
	-->
	<script src="wrap.js"></script>
	        <script language=JavaScript>
		document.helpkey = 'athenaNetwork_PH.htm';	
		</script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
	<!--[if !IE]><!-->
	
	<link rel="stylesheet" type="text/css" href="user.css">
	<!--<![endif]-->
	<!--[if IE]>
		<link rel="stylesheet" type="text/css" href="user-IE.css" />
	<![endif]-->
	
	<!----REQUIRED FOR SCRIPT TO LOAD ON SAME PAGE WITHOUT RELOAD ----->
	
	<script type="text/javascript">
		$(function() {
            $("#loader").css({ 'background-image':'url(images/loader.gif)' });
			$("#lets_search").bind('submit',function() {
				var value = $('#str').val();
				$.post('database.php',{value:value}, function(data){
					$("#search_results").html(data);
					$("#loader").css({ 'background-image':'url()' });
				});
				return false;
			});
		});
	</script>
	
</head>

<b>Athena Call Routing Sheet</b>


<div class="main">
	
	<table><tr><td><br />
		<img src="http://a0.twimg.com/profile_images/1138695863/twitter-icon.png" width="100px">
		</td><td>Enter the Keyword and hit Send  
		<form id="lets_search" action="" name="form" method="post">
			<input type="text" name="str" id="str"><br />
			<input type="submit" value="Look Up" name="name" id="send">
			
		</form>
	</td></tr></table>
	<hr />
	
	<div class="most_searched">
		<?php
			
			$count = mysql_query("SELECT keyword, COUNT(keyword) AS cnt
			FROM keyword_athena
			GROUP BY keyword
			HAVING (cnt > 0)
			ORDER BY cnt DESC
			LIMIT 3 ");
			
			echo "";
			echo "<table border='.9' color='#fff'>
			<tr>
			<th bgcolor='#42520e' style='font-size:18px; color:#fff;'>Keyword</th>
			<th bgcolor='#42520e'style='font-size:18px; color:#fff;'>Count</th>
			
			
			</tr>";
			while ($data = mysql_fetch_array($count)) {
				
				echo "<tr><td align='center'>";
				echo $data['keyword'];
				echo "</td><td align='center'>";
				echo $data['cnt'];
				echo "</td></tr>";
				
			}
			echo "</table>";
			
		?>
	</div>
	
	<div class="search_arrow">
		
		Most Searched Terms
		<div class="arrowimg">
		</div>
	</div>
	
	<a href="index.php?action=clear_login">logout</a>
	<div id="search_results"></div>
	
	<div id="output"></div>
	
</div>


<hr />


</body>										